<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

	<style>
.red {
	color: red;
}

.green {
	color: green;
}
</style>
	<h:form>
		<rich:graphValidator value="#{passwordValidationBean}" id="gv">
			<rich:panel header="Change password" style="width:500px">
				<rich:messages for="gv"/>
				<rich:messages globalOnly="true"/>
				<h:panelGrid columns="3">
					<h:outputText value="Enter new password:" />
					<h:inputSecret value="#{passwordValidationBean.password}" id="pass" />
					<rich:message for="pass" />
					<h:outputText value="Confirm the new password:" />
					<h:inputSecret value="#{passwordValidationBean.confirm}" id="conf" />
					<rich:message for="conf" />
				</h:panelGrid>
				<a4j:commandButton value="Store changes"
					action="#{passwordValidationBean.storeNewPassword}" />
			</rich:panel>
		</rich:graphValidator>
	</h:form>
</ui:composition>